//////////////////////////////////////////////////////////////////////////////////////////////
//	File			:	"GameplayState.h"
//
//	Author			:	Mike Davis, Matt Stover, James Thornton, Keith Webster
//	
//	Project			:	TacWars
//
//	Last Modified	:	11/6/2013
//
//	Purpose			:	
//
//////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "IGameState.h"
#include "../GameObjects/Entity.h"
#include "../MapSystem/BattleMap.h"
#include "../ParticleSystem/EmitterManager.h"
#include "../Animation/AnimationManager.h"
#include "../Animation/AnimInfo.h"
#include "../GameObjects/Player.h"
#include "../MapSystem/MapManager.h"
#include <vector>
using namespace std;

class CSGD_MessageSystem;
class CSGD_EventSystem;
class IMessage;
class Player;
class CEntity;
class CEntityManager;
class Player;
class CBitmapFont;
class BattleMap;
class Cursor;
class Interface;
class MapManager;
class GameplayState : public IGameState
{
public:
	static GameplayState* GetInstance();

	virtual void Enter();
	virtual void Exit();						
	virtual bool Input();					
	virtual void Update( float fElapsedTime );	
	virtual void Render();	
	int GetWorldX() const {return worldX;}
	int GetWorldY() const {return worldY;}
	int GetCamX() const {return camX;}
	int GetCamY() const {return camY;}
	int GetTurnCount() const {return turnCount;}

	void SetWorldX (int v) { worldX = v;}
	void SetWorldY (int v) { worldY = v;}
	void SetCamX (int v) { camX = v;}
	void SetCamY (int v) { camY = v;}

	void StayInWorld();
	void SaveGameInfo();

	Player* player1;
	Player* player2;
	Entity* target;
	Entity* selected;
	Cursor* GetCursor();

	int heartID, swordID, crownID, portraitID, bootID, bowID;
private:
	GameplayState();
	virtual ~GameplayState();
	GameplayState(const GameplayState&);
	GameplayState& operator= (const GameplayState&);

	static void MessageProc(IMessage* pMsg);
	CAnimationManager* animManager;
	AnimInfo* aniInfo;
	EmitterManager*			EM;
	CSGD_MessageSystem*		MS;
	CSGD_EventSystem*		ES;
	//BattleMap* demomap;
	Interface*				IFace;
	MapManager*             MM;

	
	Cursor* cursor;
	int titleImgID, camX, camY, worldX, worldY, mapImgID, cursorImgID, turnCount, testHPdmg, testLPdmg;



	bool moverange;
	bool attackrange;
	MapManager* mapManager;
	Emitter* testEmit;
};